package com.laoxu.student.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.laoxu.student.business.entity.Class;
import com.laoxu.student.business.mapper.ClassMapper;
import com.laoxu.student.business.service.ClassService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.laoxu.student.business.vo.ClassVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 班级 服务实现类
 * </p>
 *
 * @author Laoxu
 * @since 2020-04-04
 */
@Service
public class ClassServiceImpl extends ServiceImpl<ClassMapper, Class> implements ClassService {

    @Override
    public void pageQuery(Page<ClassVO> pageParam) {
        List<ClassVO> records = this.baseMapper.selectClassList(pageParam);
        pageParam.setRecords(records);
        pageParam.setTotal(records.size());
    }
}
